package joodle.ui;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;
import javax.swing.KeyStroke;

import joodle.si.ResourceManager;
/**
 * Represents the "Exit" action on the menu bar
 *
 */
@SuppressWarnings("serial")
public class ExitAction extends AbstractAction {

	public ExitAction() {
		super(ResourceManager.message("EXIT"), ResourceManager.makeIcon("close"));
		putValue(MNEMONIC_KEY, KeyEvent.VK_X);
		putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke("control X"));
	}
	/**
	 * @see AbstractAction#actionPerformed(ActionEvent)
	 */
	@Override
	public void actionPerformed(ActionEvent e) {
		System.exit(0);
	}
}
